<template>
  <div>
    <el-menu
      :default-active="this.$route.path"
      router
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item index="/">硬件管理</el-menu-item>
      <el-menu-item index="/realtime">实时数据</el-menu-item>
      <el-menu-item index="/history">历史数据</el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "ViewHeader",
  data() {
      return {
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        // console.log(key, keyPath);
      }
    }
};
</script>
